package com.mall.seckill_mall.entity;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;

@Data
public class User implements Serializable {

    @NotBlank(message = "手机号不能为空")
    @Size(min = 11, max = 11, message = "手机号格式错误")
    private String userId;

    @NotBlank(message = "用户名不能为空")
    @Size(min = 1, max = 16, message = "用户名长度在1-16位之间")
    private String userName;

    @NotBlank(message = "密码不能为空")
    @Size(min = 6, max = 32, message = "密码长度在6-32位之间")
    private String userPassWord;

    private double userBalance;
}
